USE [HomestayWebDB]
GO
/****** Object:  StoredProcedure [dbo].[Store_User_GetUserOfSystem]    Script Date: 11/26/2012 17:35:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[Store_User_GetUserOfSystem]
	@RoleID int
AS
BEGIN  
 SELECT u.Username, 
		u.Fullname,
		r.RoleName,
		u.Email,
		u.Phone,
		u.IsDeleted
 FROM Users u LEFT JOIN Roles r ON u.RoleID = r.RoleID
 WHERE u.RoleID < @RoleID  
END  
  

